package com.mark.mall.web.platform.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.mark.mall.web.platform.enums.SexEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 会员表
 * </p>
 *
 * @author admin
 * @since 2021-02-28
 */
@TableName(value = "t_member")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Member对象", description = "会员表")
public class Member extends Model<Member> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "会员名称")
    @TableField("c_name")
    private String name;

    @ApiModelProperty(value = "会员密码")
    @TableField("c_password")
    private String password;

    @ApiModelProperty(value = "盐值")
    @TableField("salt")
    private String salt;

    @ApiModelProperty(value = "会员真实姓名")
    @TableField("c_realname")
    private String realname;

    @ApiModelProperty(value = "会员手机号")
    @TableField("c_mobile")
    private String mobile;

    @ApiModelProperty(value = "会员邮箱")
    @TableField("c_mail")
    private String mail;

    @ApiModelProperty(value = "会员状态")
    @TableField(value = "c_state",select = false,fill = FieldFill.INSERT)
    private String state;

    @ApiModelProperty(value = "会员性别")
    @TableField("c_sex")
    private SexEnum sex;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "createtime",fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    @ApiModelProperty(value = "冗余字段")
    @TableField(exist = false)
    private String address;


}
